package com.yunzhi.net.api;


import android.content.Context;

import androidx.annotation.NonNull;

import com.yunzhi.net.callback.BaseObserver;
import com.yunzhi.net.entity.BaseResponse;
import com.yunzhi.net.enumerate.AppStateCode;


/**
 * Author by Mr.Meng
 * created 2019/5/17
 *
 * @desc
 */
public abstract class NetObserver<T extends BaseResponse> extends BaseObserver<T> {

    public NetObserver(@NonNull Context context, boolean isShowLoad) {
        super(context, isShowLoad);
    }


    @Override
    protected void onLogicError(AppStateCode error, String msg) {
        super.onLogicError(error, msg);
        onError(error.getCode(), msg);
    }

}
